﻿Option Strict Off

Public Class History

    Private Sub History_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        ListBox1.Items.Clear()
    End Sub

    Private Sub History_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        For Each BrowserHistory As String In My.Settings.BrowserHistory
            ListBox1.Items.Add(BrowserHistory)
        Next
    End Sub

    Private Sub DeleteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DeleteToolStripMenuItem.Click
        My.Settings.BrowserHistory.Remove(ListBox1.SelectedItem)
        ListBox1.Items.Clear()
        For Each BrowserHistory As String In My.Settings.BrowserHistory
            ListBox1.Items.Add(BrowserHistory)
        Next
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        My.Settings.BrowserHistory.Remove(ListBox1.SelectedItem)
        ListBox1.Items.Clear()
        For Each BrowserHistory As String In My.Settings.BrowserHistory
            ListBox1.Items.Add(BrowserHistory)
        Next
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            My.Settings.BrowserHistory.Clear()
            ListBox1.Items.Clear()
        My.Settings.BrowserHistory.Add(BrowserWithoutTabs1.WebBrowser1.Url.ToString)
            For Each BrowserHistory As String In My.Settings.BrowserHistory
                ListBox1.Items.Add(BrowserHistory)
            Next
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Me.Close()
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        BrowserWithoutTabs1.WebBrowser1.Navigate(ListBox1.SelectedItem.ToString)
        Me.Close()
    End Sub
End Class